package com.rran.study.designpattern.behavioral.state;

/**
 * @author yy
 * @Type AfterMorning.java
 * @Desc 状态的分支 下午状态
 * @date 2020/7/27 19:03
 */
public class AfterMorning implements State {

    @Override
    public void WriteProgram(Work work) {

        if (work.getHour() < 14) {
            System.out.println("有点困了");
        } else {
            work.setState(new Evening());
            work.writeProgram();
        }
    }
}

